package com.hqyj.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.amqp.support.converter.MessageConverter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description
 * @Autor 伍军
 * @Date 2022/10/11 10:21
 * @Version 1.0
 **/
@Configuration
public class MqConfig {
    /*---------------消息转换配置-----*/
    /*如果发送的消息是pojo类，实现序列化接口，map类型不需要*/
    @Bean
    public MessageConverter messageConverter() {
        return new Jackson2JsonMessageConverter();
    }


}
